from django.conf.urls import url

from . import views

urlpatterns = [

    # url(正则路由.函数视图)
    # as_view内部根据请求方法自动分发 找到类中对象的方法 把方法转成函数
    url(r'^demoview/$', views.Demoview.as_view()),
    url(r'^bookview/$', views.BookView.as_view()),


    # 在路由中同装饰器按时_view返回的那个函数,会把类视图中的所有方法都装饰
    # url(r'^demoview/$', views.my_decorator(views.Demoview.as_view())),
    # 加载模板
    url(r'^template_view/$', views.TemplateView.as_view()),

    url(r'^list_model_mixin/$', views.ListModelMixin.as_view()),
    url(r'^create_model_mixin/$', views.CreateModelMixin.as_view()),
]
